package cn.kgc.springday07.interfaces;

import cn.kgc.springday07.annotations.OperationLog;
import org.springframework.stereotype.Component;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/16
 * @Description: 使用 spring中aop的功能实现业务功能的增强
 */
@Component
public class TeacherLi implements Teacher {

    @Override
    @OperationLog
    public String teachOnline(String course, Integer time) {

        System.out.println(course+"课程线上授课中.....");

        return course+"课程的时间是"+time+" min";
    }

    @Override
    @OperationLog
    public String teachOffline(String course) {

        System.out.println(course+"课程线下授课中.....");

        //int a = 1/0;
        return course;
    }
}
